#ifndef MATRIXKEY_H_
#define MATRIXKEY_H_
#include "sys.h"


#define KEY_L1		PEout(12)
#define KEY_L2		PEout(13)
#define KEY_L3		PEout(14)
#define KEY_L4      PEout(15)

#define KEY_L1_SetL     KEY_L1=0
#define KEY_L2_SetL     KEY_L2=0
#define KEY_L3_SetL     KEY_L3=0
#define KEY_L4_SetL     KEY_L4=0

#define KEY_L1_SetH		KEY_L1=1
#define KEY_L2_SetH		KEY_L2=1
#define KEY_L3_SetH		KEY_L3=1
#define KEY_L4_SetH     KEY_L4=1

#define KEY_H1			PEin(8)
#define KEY_H2			PEin(9)
#define KEY_H3			PEin(10)
#define KEY_H4          PEin(11)

#define KEY1_PRESS		1
#define KEY2_PRESS		2
#define KEY3_PRESS		3
#define KEY4_PRESS		4
#define KEY5_PRESS		5
#define KEY6_PRESS		6
#define KEY7_PRESS		7
#define KEY8_PRESS		8
#define KEY9_PRESS		9
#define KEY10_PRESS     10
#define KEY11_PRESS     11
#define KEY12_PRESS     12
#define KEY13_PRESS     13
#define KEY14_PRESS     14
#define KEY15_PRESS     15
#define KEY16_PRESS     16
#define KEY_UNPRESS		0


void Matrix_Init(void);
char Matrix_Scan(char mode);




#endif /* KEY_H_ */
